<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>触底加载</title>
    <script src="./index.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }

        header,footer{
            width: 100%;
            padding: 10px 0;
            margin: 5px 0;
            text-align: center;
            background-color: skyblue;
        }

        .container{
            width: 1200px;
            margin: 0 auto;
        }
        main ul{
            /* border: 1px solid red; */
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
        }

        main ul li{
            width: 23%;
            margin: 5px 0;
            border: 1px solid #000;
            line-height: 30px;
        }

        img{
            width: 100px;
        }

        .loading{ display: none;}
        .box{
            width: 200px;
            height: 50px;
            border-radius: 50px;
            border: 2px solid #ccc;
            overflow: hidden;
            margin: 5px auto;
        }
        .box>div{
            width: 0;
            height: 100%;
            background: linear-gradient(90deg, pink, skyblue);
            animation: a1 1s linear infinite;
        }
        @keyframes a1{
            from{
                width: 0;
            }
            to{
                width: 100%;
            }
        }
    </style>
</head>
<body>
    
    <div class="container">
        <header>
            <h2>顶部导航</h2>
        </header>
        <main>
            <ul class="content"></ul>
        </main>
        <div class="loading">
            <div class="box"><div></div></div>
        </div>
        <footer>
            <h2>底部</h2>
        </footer>
    </div>
</body>
</html>